﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div id="groupListTable" class="main-content">
    <h3 class="page-title">用户组列表User group list</h3>

    <div class="panel">
        <div class="panel-body">
            <button class="btn btn-primary" v-on:click="AddGroup">
                <i class="fa fa-user-plus"></i> 新增用户组Add user group
            </button>
            <br />
            <br />
            <table class="table table-striped" v-if="isNotEmptyObject(groupList)">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>组名称Group name</th>
                        <th>成员数量Number of members</th>
                        <th>操作operation</th>
                    </tr>
                </thead>
                <tbody v-for="(group, index) in groupList">
                    <tr>
                        <td>{{group.BaseInfo.ID}}</td>
                        <td>{{group.BaseInfo.Name}}</td>
                        <td>{{group.UserGroupMappings.length}}</td>
                        <td>
                            <button type="button" class="btn btn-info btn-xs" v-on:click="EditGroup(group.BaseInfo)">
                                <i class="fa fa-edit"></i> 编辑edit
                            </button>
                            <button type="button" class="btn btn-danger btn-xs" v-on:click="DeleteGroup(group.BaseInfo)">
                                <i class="fa fa-trash"></i> 删除delete
                            </button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <!-- END TABLE -->
    <div class="alert alert-warning alert-dismissible" role="alert">
        <i class="fa fa-warning"></i>
        <p>用户组是用于签核功能User group is used for sign off function。</p>
    </div>
</div>


@section scripts{
    <script type="text/javascript" src="~/Scripts/pageJs/Account/Group.js?v=@DateTime.Now.ToFileTimeUtc()"></script>
}
